import request from "@/utils/request";

// 获取积分记录列表
export function getPointList(params) {
	return request.get("/points", params);
}

// 获取用户积分记录
export function getUserPointList(userId, params) {
	return request.get(`/points/user/${userId}`, params);
}

// 获取积分记录详情
export function getPointDetail(id) {
	return request.get(`/points/${id}`);
}

// 新增积分记录
export function addPoint(data) {
	return request.post("/points", data);
}

// 删除积分记录
export function deletePoint(id) {
	return request.delete(`/points/${id}`);
}
